﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

namespace WcfContrib.Client.Behaviors
{
    /// <summary>
    /// Represents an interface for invoking a client operation and yielding a result
    /// </summary>
    public interface IClientOperationInvokerBehavior
    {
        /// <summary>
        /// Provides the operation result.
        /// </summary>
        /// <param name="clientChannel">The client channel.</param>
        /// <param name="context">The invocation context.</param>
        /// <param name="correlationState">The correlation state received if implements inspection too.</param>
        /// <param name="providedResult">if set to <c>true</c>, the returned object is considered as the invocation result.</param>
        /// <returns>The invocation result</returns>
        object ProvideResult(ClientChannel clientChannel, ChannelInvokeContext context, object correlationState, out bool providedResult);
    }
}
